<?php
namespace Common\Model;

use Think\Model\RelationModel;

class TakeModel extends RelationModel
{
    const TAKE_WAIT = 1;
    const TAKE_SUCCESS = 2;
    protected $_link = array(
        'container' => array(
            'mapping_type'  => self::BELONGS_TO,
            'class_name'    => 'Container',
            'foreign_key'   => 'container_id'
        ),
        'user' => array(
            'mapping_type'  => self::BELONGS_TO,
            'class_name'    => 'User',
            'foreign_key'   => 'user_id',
            'mapping_fields'=>'express_name,addr'
        )
    );
}